package com.cheng.project_model1.constract;

/**
 * @Author: Lone_Wolf
 * @Description: 系统模块
 * @Date: 2019/7/25 10:41
 */
public class SystemModule {
    /**
     * 占地生态
     */
    public static int landOccupationEcology = 1;
    /**
     * 安全防范
     */
    public static int security = 2;

    public static String landOccupationEcologyName = "占地生态";
    public static String securityName = "安全防范";

    public static String getModuleName(Integer moduleId) {
        if (moduleId.equals(landOccupationEcology)) {
            return landOccupationEcologyName;
        } else if (moduleId.equals(security)) {
            return securityName;
        } else {
            return "";
        }
    }

    public static Integer getModuleId(String moduleName) {
        if (moduleName.equals(landOccupationEcologyName)) {
            return landOccupationEcology;
        } else if (moduleName.equals(securityName)) {
            return security;
        } else {
            return null;
        }
    }
}
